/* 
 * File:   Menu_Widget.h
 * Author: Filipp
 *
 * Created on June 16, 2010, 1:30 PM
 */

#ifndef _MENU_WIDGET_H
#define	_MENU_WIDGET_H

#include "Super_Widget.h"
#include <vector>

class Menu_Widget : public Text_Widget{
public:
	Menu_Widget(Super_Man* hero, const sf::Unicode::Text& text = "", bool goRight=false);
	void update(const sf::Input& sfi, float time);
	bool IsInside(float x, float y) const;
	bool IsInside(const vec2f& Position) const;
	bool IsInside(const sf::Vector2f& Position) const;
	void RegisterWidget(Super_Widget& widget);
	void DeregisterWidget(const Super_Widget& widget);
	void setup();	//sizes and positions registerred widgets
private:
	std::vector<Super_Widget*> items; //0 is always this
	bool isActive;
	size_t activeIndex;
	bool expandRight;
	bool lastMouseState;
protected:
	void Render(sf::RenderTarget& Target) const;
};

#endif	/* _MENU_WIDGET_H */

